var http = require("https");

var options = {
    "method": "POST",
    "hostname": "oapi.dingtalk.com",
    "port": null,
    "path": "/robot/send?access_token=b7584cbdf3174b63006414f985f45f0ca9d7bbf9c44c336ead35d0a5c23b0e14",
    "headers": {
        "content-type": "application/json",
        "cache-control": "no-cache",
        "postman-token": "13c24749-5933-1dc3-7ca1-4259039967a7"
    }
};

var req = http.request(options, function(res) {
    var chunks = [];

    res.on("data", function(chunk) {
        chunks.push(chunk);
    });

    res.on("end", function() {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
    });
});

req.write(JSON.stringify({
    msgtype: 'markdown',
    markdown:
        {
            title: '应用构建成功',
            text: '#### 应用构建成功  \n > challenge项目\n\n > ![screenshot](https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3502465005,4153501499&fm=200&gp=0.jpg)\n  > ###### 10点20分发布 [跳转到应用构建中心](http://www.kybird.cn:8081/) '
        }
}));
req.end();